Plugin Directory

Changeset 2016871

Timestamp:
01/22/2019 12:14:03 PM (6 years ago)
Author:
euthelup
Message:

update to 0.6.0

Location:
wp-custom-body-class/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wp-custom-body-class/trunk/class-custom_body_class.php

    r1783384 r2016871  
    2121     * @const   string
    2222     */
    23     protected $version = '0.5.0';
     23    protected $version = '0..0';
    2424
    2525    /**
     
    7070        $this->get_plugin_settings();
    7171
    72 
    7372        // Load plugin text domain
    7473        add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
     
    7978        $plugin_basename = plugin_basename( plugin_dir_path( __FILE__ ) . 'custom_body_class.php' );
    8079        add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
    81 
    82         if ( isset( $this->plugin_settings['allow_edit_on_post_page'] ) && $this->plugin_settings['allow_edit_on_post_page'] ) {
    83 
    84             add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
    85 
    86             // add the metabox
    87             add_action( 'add_meta_boxes', array( $this, 'add_custom_body_class_meta_box' ) );
    88             add_action( 'save_post', array( $this, 'custom_body_class_save_meta_data' ) );
    89         }
    90 
     80       
     81        // here is where the magic happens in front-end.
    9182        add_filter( 'body_class', array( $this, 'add_post_type_custom_body_class_in_front' ) );
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
    9298    }
    9399
  • wp-custom-body-class/trunk/custom_body_class.php

    r1783384 r2016871  
    44Plugin URI:  https://a.lupu.pro
    55Description: A plugin which allows you to add a custom CSS class the HTML body tag
    6 Version: 0.5.0
     6Version: 0..0
    77Author: Andrei Lupu
    88Author URI: https://a.lupu.pro
  • wp-custom-body-class/trunk/js/admin-custom-body-class.js

    r1244176 r2016871  
    66        };
    77
    8         if ( typeof custom_body_class_post_values !==undefined ) {
     8        if ( typeof custom_body_class_post_values !== ) {
    99            args['autocomplete'] = {
    1010                //delay: 0, // show suggestions immediately
  • wp-custom-body-class/trunk/plugin-defaults.php

    r1783384 r2016871  
    55    # General
    66
    7     'display_on_post_types' => array('post' => 'on', 'page' => 'on'),
     7    'display_on_post_types' => array('post' => 'on', 'page' => 'on'),
    88    'allow_edit_on_post_page' => 1,
    9     'enable_autocomplete' => 1,
    10     'global_class' => '',
     9    'admins_only'             => 0,
     10    'enable_autocomplete'     => 1,
     11    'global_class'            => '',
    1112
    1213); # config
  • wp-custom-body-class/trunk/readme.txt

    r1783384 r2016871  
    22Contributors: euthelup
    33Tags: custom, body, css, class
    4 Requires at least: 4.7.0
    5 Tested up to: 4.9.1
    6 Stable tag: 0.5.0
     4Requires at least: 4..0
     5Tested up to:
     6Stable tag: 0..0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 A plugin which allows you to add a custom CSS class the HTML body tag
     10A plugin which allows you to add a custom CSS class the HTML body tag
    1111
    1212== Description ==
     
    2323
    2424== Changelog ==
     25
     26
     27
     28
    2529
    2630= 0.5.0 =
  • wp-custom-body-class/trunk/settings/general.php

    r1783384 r2016871  
    66    'options' => array(
    77        'allow_edit_on_post_page' => array(
    8             'label'          => __( 'Allow Edit Fields', 'custom_body_class_txtd' ),
     8            'label'          => __( '', 'custom_body_class_txtd' ),
    99            'default'        => true,
    1010            'type'           => 'switch',
    11             'desc' => __( 'Here you can decide if the body class meta box is visible to editors' ),
     11        ),
     12        'admins_only' => array(
     13            'label'          => __( 'Restrict for Administrators only', 'custom_body_class_txtd' ),
     14            'default'        => false,
     15            'type'           => 'switch',
    1216        ),
    1317        'enable_autocomplete' => array(
     
    1519            'default'        => true,
    1620            'type'           => 'switch',
    17             'desc' => __( 'Would you like to get auto completed values?' ),
    1821        ),
    19 
    2022        'global_class' => array(
    2123            'label'          => __( 'Global Class', 'custom_body_class_txtd' ),
    2224            'default'        => '',
    2325            'type'           => 'text',
    24             'description' => __( 'If you need a temporary CSS class on the entire website here is the place' ),
     26            'desc' => __( 'If you need a temporary CSS class on the entire website here is the place' ),
    2527        ),
    26        
    2728        'display_on_post_types' => array(
    2829            'label'          => __( 'Post Types', 'custom_body_class_txtd' ),
Note: See TracChangeset for help on using the changeset viewer.