Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:18:15+00:00 2026-06-15T07:18:15+00:00

I have this wordpress plugin for shorcodes. I´m trying to implement this in my

  • 0

I have this wordpress plugin for shorcodes. I´m trying to implement this in my theme without the need of installing it.

How can I change this 2 lines of code where it says “plugin_dir_url”, so it grabs the files from my template folder?

class SYMPLE_TinyMCE_Buttons {
function __construct() {
    add_action( 'init', array(&$this,'init') );
}
function init() {
    if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
        return;     
    if ( get_user_option('rich_editing') == 'true' ) {  
        add_filter( 'mce_external_plugins', array(&$this, 'add_plugin') );  
        add_filter( 'mce_buttons', array(&$this,'register_button') ); 
        **wp_localize_script( 'jquery', 'sympleShortcodesVars', array('template_url' => plugin_dir_url( __FILE__ ) ) );**
    }  
}  
function add_plugin($plugin_array) {  
   **$plugin_array['symple_shortcodes'] = plugin_dir_url( __FILE__ ) .'js/symple_shortcodes_tinymce.js';**
   return $plugin_array; 
}
function register_button($buttons) {  
   array_push($buttons, "symple_shortcodes_button");
   return $buttons; 
}   

thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:18:16+00:00Added an answer on June 15, 2026 at 7:18 am

    get_bloginfo("template_directory") should do it.

    Codex: get_bloginfo()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is function.php of a wordpress theme that NOD32 says this code have a
So I have this line of code inside a WordPress plugin. The code file
I have a WordPress plugin with settings page. On this settings page, the form
http://demo.thethemefoundry.com/traction/#post-183 Which wordpress plugin is this, to have post image on the left side
This is my first attempt at adding ajax to a WordPress plugin. I have
I have used this plugin http://wordpress.org/extend/plugins/wp-featured-content-slider/ in my web page. It works fine. But
I have developed a wordpress plugin that uses jquery. This plugin have some javascript
This is a simple concept question... If I have a wordpress plugin and I
I am trying to create a wordpress plugin in which user can submit their
I am using wordpress 3.3.1 with twentyten theme, i have created a plugin to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.