Plugin Directory

Changeset 1428794


Ignore:
Timestamp:
06/02/2016 04:36:17 AM (10 years ago)
Author:
royaltechbd
Message:

Version

Location:
rt-custom-css-page-and-post/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rt-custom-css-page-and-post/trunk/readme.txt

    r1168117 r1428794  
    44Tags: Royal, Custom CSS, CSS, Page, Post
    55Requires at least: 3.3
    6 Tested up to: 4.2.2
    7 Stable tag: 1.1
     6Tested up to: 4.5.2
     7Stable tag: 1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5353
    5454== Changelog ==
     55= 1.2 =
     56* Bug fixed
     57
    5558= 1.1 =
    5659* Version update
  • rt-custom-css-page-and-post/trunk/rt-custom-css-page-and-post.php

    r1168117 r1428794  
    22/*
    33Plugin Name: Royal Custom CSS for Page and Post
    4 Plugin URI: http://wordpress.org/plugins/rt-custom-css/
     4Plugin URI: https://wordpress.org/support/plugin/rt-custom-css-page-and-post
    55Description: Royal Custom CSS for every Page and Post
    66Author: SM Mehdi Akram
    7 Version: 1.1
     7Version: 1.2
    88Author URI: http://www.shamokaldarpon.com/
    99*/
     
    1515add_action('wp_head','rt_insert_custom_css');
    1616function rt_custom_css_hooks() {
    17     add_meta_box('custom_css', 'Royal Custom CSS', 'custom_css_input', 'post', 'normal', 'high');
    18     add_meta_box('custom_css', 'Royal Custom CSS', 'custom_css_input', 'page', 'normal', 'high');
     17    add_meta_box('royal_custom_css', 'Royal Custom CSS', 'custom_css_input', 'post', 'normal', 'high');
     18    add_meta_box('royal_custom_css', 'Royal Custom CSS', 'custom_css_input', 'page', 'normal', 'high');
    1919}
    2020function custom_css_input() {
    2121    global $post;
    22     echo '<input type="hidden" name="custom_css_noncename" id="custom_css_noncename" value="'.wp_create_nonce('custom-css').'" />';
    23     echo '<textarea name="custom_css" id="custom_css" rows="5" cols="30" style="width:100%;">'.get_post_meta($post->ID,'rt_custom_css',true).'</textarea>';
     22    echo '<input type="hidden" name="royal_custom_css_noncename" id="royal_custom_css_noncename" value="'.wp_create_nonce('royal-custom-css').'" />';
     23    echo '<textarea name="royal_custom_css" id="royal_custom_css" rows="35" cols="30" style="width:100%;">'.get_post_meta($post->ID,'rt_custom_css',true).'</textarea>';
    2424}
    2525function rt_save_custom_css($post_id) {
    26     if (!wp_verify_nonce($_POST['custom_css_noncename'], 'custom-css')) return $post_id;
     26    if (!wp_verify_nonce($_POST['royal_custom_css_noncename'], 'royal-custom-css')) return $post_id;
    2727    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;
    28     $custom_css = $_POST['custom_css'];
    29     update_post_meta($post_id, 'rt_custom_css', $custom_css);
     28    $royal_custom_css = $_POST['royal_custom_css'];
     29    update_post_meta($post_id, 'rt_custom_css', $royal_custom_css);
    3030}
    3131function rt_insert_custom_css() {
Note: See TracChangeset for help on using the changeset viewer.