Plugin Directory

Changeset 1907568


Ignore:
Timestamp:
07/11/2018 10:18:29 AM (8 years ago)
Author:
mishuk24
Message:

Tinny mce buttton issue fixed

Location:
current-bitcoin-price/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • current-bitcoin-price/trunk/current-bitcoin-price.php

    r1876041 r1907568  
    1111 * @package           Current_Bitcoin_Price
    1212 *
    13  * Plugin Name:       Current Bitcoin Price
     13 * Plugin Name:       Bitcoin Price Ticker
    1414 * Plugin URI:        http://wordpress.org/plugins/current-bitcoin-price
    1515 * Description:       A simple plugin which helps you to see Current Price of Bitcoin using coindesk API
    16  * Version:           1.0.3
     16 * Version:           1.0.4
    1717 * Author:            Mishuk Adhikari
    1818 * Author URI:        http://about.me/MishukAdhikari
  • current-bitcoin-price/trunk/functions.php

    r1874869 r1907568  
    77 */
    88class CBP_main_functions {
    9    
     9
    1010    public function __construct() {
    11        
     11
    1212        add_action( 'wp_enqueue_scripts', array( $this, 'cbp_enqueuing_javascript_file' ) );
     13
    1314        add_action( 'admin_head', array( $this, 'cbp_tinnymce_button' ) );
    14        
     15
    1516        global $pagenow;
    16        
     17
    1718        if (( $pagenow == 'options-general.php' ) && ($_GET['page'] == 'cbp-admin-dashboard')) {
    1819            add_action( 'admin_enqueue_scripts', array( $this, 'cbp_admin_assets' ) );
    1920        }
    20        
     21
    2122    }
    22    
     23
    2324    /**
    2425     * Adding js and css file
    25      * 
     26     *
    2627     * @return void
    2728     */
     
    3637    /**
    3738     * Js and Css for backend
    38      * 
     39     *
    3940     * @return void
    4041     */
     
    4647    /**
    4748     * TinnyMCE button
    48      * 
     49     *
    4950     * @return void
    5051     */
     
    5253
    5354        $tinny_checkbox = get_option('cbp_options')['cbp_tinny_checkbox'];
    54        
     55
    5556        if ( $tinny_checkbox == 'on' ) {
    5657            add_filter( 'mce_external_plugins', array( $this, 'button_for_tinymce_plugin' ) );
     
    6162    /**
    6263     * Declaring button
    63      * 
     64     *
    6465     * @param button array
    6566     * @return array
     
    6869
    6970        $plugin_array['cbp_mce_button'] = plugins_url( '/assets/js/cbp-tinnymce-custom-button.js', __FILE__ );
    70        
     71
    7172        return $plugin_array;
    7273    }
     
    7576     * Adding tinny button
    7677     * if is page
    77      * 
     78     *
    7879     * @param string
    7980     * @return array
    8081     */
    8182    public function register_mce_button( $buttons ) {
    82        
    83         if ((isset($_GET['post_type']) && $_GET['post_type'] == 'page')) :
    8483
    8584            array_push( $buttons, 'cbp_mce_button' );
    86            
     85
    8786        return $buttons;
    8887
    89         endif;
    9088    }
    9189}
  • current-bitcoin-price/trunk/readme.txt

    r1876034 r1907568  
    11=== Current Bitcoin Price ===
    22Contributors: mishuk24
    3 Donate link: 
     3Donate link:
    44Tags: current bitcoin price, bitcoin, bitcoin current price, btc live price, btc current price, btc
    55Requires at least: 3.3
    6 Tested up to: 4.9.5
     6Tested up to: 4.9.7
    77Requires PHP: 5.2.4
    88Stable tag: 4.3
     
    57571.0.2 Activation hook issue fixed
    58581.0.3 Fatal error issue fixed
     591.0.4 TinnyMCE button issue fixed
    5960
    6061== Upgrade Notice ==
     
    6465version 1.0.2
    6566version 1.0.3
     67version 1.0.4
Note: See TracChangeset for help on using the changeset viewer.