Plugin Directory

Changeset 1319231


Ignore:
Timestamp:
12/31/2015 03:24:25 PM (10 years ago)
Author:
optimistic_shekhar
Message:

Added Customizer feature to add a class for title

Location:
shk-hide-title/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • shk-hide-title/trunk/hide_title.php

    r1194578 r1319231  
    5151    public function st_hide_title_css() {
    5252        global $post;
     53        $class = get_theme_mod('shk_hide_title_class_name');
    5354        $is_shown_to_be_hidden = get_post_meta($post->ID, 'st_hide_title_check_option', true);
    5455        if (empty($is_shown_to_be_hidden)) {
     
    5657        }
    5758        else {
     59            if (empty($class)) {
     60                ?>
     61                <style type="text/css">
     62                    #post-<?php echo $post->ID; ?> .entry-title,
     63                    #post-<?php echo $post->ID; ?> .entry-header h1
     64                    {display:none;}
     65                </style>
     66                <?php
     67            } else {
    5868            ?>
    59         <style type="text/css">
    60         #post-<?php echo $post->ID; ?> .entry-title,
    61         #post-<?php echo $post->ID; ?> .entry-header h1
    62          {display:none;}
    63         </style>
     69            <style type="text/css">
     70            #post-<?php echo $post->ID; ?> .<?php echo $class; ?>
     71             {display:none;}
     72            </style>
    6473
    6574        <?php   }
     75    }
    6676       
    6777    }
  • shk-hide-title/trunk/index.php

    r1194578 r1319231  
    22/**
    33 * Plugin Name: SHK Hide Title
    4  * Plugin URI: http://shekharbhandari.com.np/shk_hide_title
     4 * Plugin URI: http://shkthemes.com/shk-hide-title
    55 * Description: A Plugin To disable title for pages in WordPress
    6  * Version: 1.0.1
    7  * Author: Shekhar Bhandari
    8  * Author URI: http://shekharbhandari.com.np/
     6 * Version: 1.0.2
     7 * Author: Shekhar Bhandari, Shk Themes
     8 * Author URI: http://shkthemes.com/
    99 * Text Domain: shk-hide-title
    1010 * License: GPL2
     
    1414include(__DIR__.'/hide_title.php');
    1515
     16include(__DIR__.'/theme_customization.php');
     17
    1618?>
  • shk-hide-title/trunk/readme.txt

    r1194578 r1319231  
    11=== SHK Hide Title ===
    2 Contributors: optimistic_shekhar
     2Contributors: optimistic_shekhar, shkthemes
    33Tags: Hide Title, WordPress
    44Requires at least: 4.2
     
    2020--------
    2121
     2231/122015 version 1.0.2
     23[!] Added Customizer option to enter the header class
     24
     25--------
     26
Note: See TracChangeset for help on using the changeset viewer.