Changeset 2016871
- Timestamp:
- 01/22/2019 12:14:03 PM (6 years ago)
- 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 21 21 * @const string 22 22 */ 23 protected $version = '0. 5.0';23 protected $version = '0..0'; 24 24 25 25 /** … … 70 70 $this->get_plugin_settings(); 71 71 72 73 72 // Load plugin text domain 74 73 add_action( 'init', array( $this, 'load_plugin_textdomain' ) ); … … 79 78 $plugin_basename = plugin_basename( plugin_dir_path( __FILE__ ) . 'custom_body_class.php' ); 80 79 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. 91 82 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 92 98 } 93 99 -
wp-custom-body-class/trunk/custom_body_class.php
r1783384 r2016871 4 4 Plugin URI: https://a.lupu.pro 5 5 Description: A plugin which allows you to add a custom CSS class the HTML body tag 6 Version: 0. 5.06 Version: 0..0 7 7 Author: Andrei Lupu 8 8 Author URI: https://a.lupu.pro -
wp-custom-body-class/trunk/js/admin-custom-body-class.js
r1244176 r2016871 6 6 }; 7 7 8 if ( typeof custom_body_class_post_values !== undefined) {8 if ( typeof custom_body_class_post_values !== ) { 9 9 args['autocomplete'] = { 10 10 //delay: 0, // show suggestions immediately -
wp-custom-body-class/trunk/plugin-defaults.php
r1783384 r2016871 5 5 # General 6 6 7 'display_on_post_types' => array('post' => 'on', 'page' => 'on'),7 'display_on_post_types' => array('post' => 'on', 'page' => 'on'), 8 8 'allow_edit_on_post_page' => 1, 9 'enable_autocomplete' => 1, 10 'global_class' => '', 9 'admins_only' => 0, 10 'enable_autocomplete' => 1, 11 'global_class' => '', 11 12 12 13 ); # config -
wp-custom-body-class/trunk/readme.txt
r1783384 r2016871 2 2 Contributors: euthelup 3 3 Tags: custom, body, css, class 4 Requires at least: 4. 7.05 Tested up to: 4.9.16 Stable tag: 0. 5.04 Requires at least: 4..0 5 Tested up to: 6 Stable tag: 0..0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 A plugin which allows you to add a custom CSS class the HTML body tag 10 A plugin which allows you to add a custom CSS class the HTML body tag 11 11 12 12 == Description == … … 23 23 24 24 == Changelog == 25 26 27 28 25 29 26 30 = 0.5.0 = -
wp-custom-body-class/trunk/settings/general.php
r1783384 r2016871 6 6 'options' => array( 7 7 'allow_edit_on_post_page' => array( 8 'label' => __( ' Allow Edit Fields', 'custom_body_class_txtd' ),8 'label' => __( '', 'custom_body_class_txtd' ), 9 9 'default' => true, 10 10 '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', 12 16 ), 13 17 'enable_autocomplete' => array( … … 15 19 'default' => true, 16 20 'type' => 'switch', 17 'desc' => __( 'Would you like to get auto completed values?' ),18 21 ), 19 20 22 'global_class' => array( 21 23 'label' => __( 'Global Class', 'custom_body_class_txtd' ), 22 24 'default' => '', 23 25 'type' => 'text', 24 'desc ription' => __( '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' ), 25 27 ), 26 27 28 'display_on_post_types' => array( 28 29 'label' => __( 'Post Types', 'custom_body_class_txtd' ),
Note: See TracChangeset
for help on using the changeset viewer.