Plugin Directory

Changeset 1793037


Ignore:
Timestamp:
12/27/2017 10:45:40 AM (8 years ago)
Author:
phankimi
Message:

+ fix bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • like-share-zalo-button/trunk/like-share-zalo-button.php

    r1783770 r1793037  
    1313?>
    1414<?php
    15 if( ! defined ( 'WPINC' ) ) {
     15if ( ! defined ( 'WPINC' ) ) {
    1616    die;
    1717}
    18 
    1918
    2019add_action( 'wp_enqueue_scripts', 'lszb_enqueue_script' );
     
    2322}
    2423
    25 // setup field for zalo setting page
     24// Setup field for zalo setting page
    2625add_action('admin_init', 'lszb_admin_init');
    2726function lszb_admin_init() {
     
    6160// insert Zalo button below post content
    6261add_filter( 'the_content', 'lszb_zalo_social_button' );
    63 function lszb_zalo_social_button($content) {
     62function lszb_zalo_social_button( $content ) {
    6463    if( is_single() && ! empty ( $GLOBALS['post'] ) ) {
    6564        if( $GLOBALS['post']->ID == get_the_ID() ) {
     
    7069            return $content;
    7170        }
    72     }
     71    } else {
     72        return $content;
     73    }
    7374}
    7475
Note: See TracChangeset for help on using the changeset viewer.