Plugin Directory

Changeset 2303235


Ignore:
Timestamp:
05/12/2020 08:17:03 AM (6 years ago)
Author:
webhack
Message:

Edit files new ver

Location:
wha-crossword/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wha-crossword/trunk/readme.txt

    r2297593 r2303235  
    22=== Crossword Puzzles game ===
    33Contributors: webhelpagency
    4 Version: 1.1.7
     4Version: 1.1.8
    55Donate link: http://webhelpagency.com/
    66Tags: crossword, game, mind, puzzles
  • wha-crossword/trunk/wha-crossword.php

    r2297593 r2303235  
    44 * Plugin Name:       WHA Crossword
    55 * Description:       The plugin creates an easy crossword from the words of any combination.
    6  * Version:           1.1.7
     6 * Version:           1.1.8
    77 * Author:            WHA
    88 * Author URI:        http://webhelpagency.com/
     
    2828
    2929if (!defined('ABSPATH')) {
    30     exit; // Exit if accessed directly
     30    exit;
    3131}
    3232
     
    4040
    4141
    42 function crossword_activation()
    43 {
    44 }
     42function crossword_activation() {}
    4543
    4644register_activation_hook(__FILE__, 'crossword_activation');
    4745
    48 function crossword_deactivation()
    49 {
    50 }
     46function crossword_deactivation() {}
    5147
    5248register_deactivation_hook(__FILE__, 'crossword_deactivation');
    5349
    54 function wha_crossword_load_plugin_textdomain()
    55 {
     50function wha_crossword_load_plugin_textdomain() {
    5651    load_plugin_textdomain('wha-crossword', FALSE, basename(dirname(__FILE__)) . 'res/languages');
    5752}
     
    6257// Add scripts & styles
    6358add_action('admin_enqueue_scripts', 'whacw_action_admin');
    64 function whacw_action_admin($hook_suffix)
    65 {
     59function whacw_action_admin($hook_suffix) {
    6660
    6761    global $post;
     
    8478// Register scripts and styles
    8579add_action('wp_enqueue_scripts', 'whacw_setup_wdscript');
    86 function whacw_setup_wdscript()
    87 {
     80function whacw_setup_wdscript() {
    8881
    8982    global $post;
     
    117110// Initialization post type
    118111add_action('init', 'whacw_register_post_type');
    119 function whacw_register_post_type()
    120 {
     112function whacw_register_post_type() {
    121113
    122114    $labels = array(
     
    159151// Create crossword page
    160152add_filter('the_content', 'whacw_create_crossword_page');
    161 function whacw_create_crossword_page($content)
    162 {
     153function whacw_create_crossword_page($content) {
    163154
    164155    global $post;
     
    179170
    180171// Create shortcode crossword
    181 function whacw_whagamecrossword_func($atts)
    182 {
     172function whacw_whagamecrossword_func($atts) {
    183173
    184174    if (!isset($atts['id'])) {
     
    238228        $html .= '<div id="modal_form_crossword">
    239229                    <span id="modal_close">X</span>
    240                     <div class="content">' . $message . '</div>
     230                    <div class="content">' . do_shortcode($message) . '</div>
    241231                  </div>
    242232                  <div id="overlay"></div>';
     
    250240// Add Crossword option box
    251241add_action('add_meta_boxes', 'whacw_add_custom_box_shortcode', 10);
    252 function whacw_add_custom_box_shortcode()
    253 {
     242function whacw_add_custom_box_shortcode() {
    254243    $screens = array('wha_crossword');
    255244    add_meta_box('myplugin_sectionid_shortcode', __('CROSSWORD SHORTCODE:','wha-crossword'), 'whacw_meta_box_shortcode_callback', $screens, 'advanced', 'high');
    256245}
    257246
    258 function whacw_meta_box_shortcode_callback($post, $meta)
    259 {
     247function whacw_meta_box_shortcode_callback($post, $meta) {
    260248    $screens = $meta['args'];
    261249
     
    268256// Add Crossword option box
    269257add_action('add_meta_boxes', 'whacw_add_custom_box', 20);
    270 function whacw_add_custom_box()
    271 {
     258function whacw_add_custom_box() {
    272259    $screens = array('wha_crossword');
    273260    add_meta_box('myplugin_sectionid', __('CROSSWORD: CLUE AND WORD','wha-crossword'), 'whacw_meta_box_callback', $screens, 'advanced', 'low');
    274261}
    275262
    276 function whacw_meta_box_callback($post, $meta)
    277 {
     263function whacw_meta_box_callback($post, $meta) {
    278264
    279265    $screens = $meta['args'];
     
    303289// Add Crossword option box
    304290add_action('add_meta_boxes', 'whacw_add_option_box', 30);
    305 function whacw_add_option_box()
    306 {
     291function whacw_add_option_box() {
    307292
    308293    $screens = array('wha_crossword');
     
    310295}
    311296
    312 function whacw_option_box_callback($post, $meta)
    313 {
     297function whacw_option_box_callback($post, $meta) {
    314298
    315299    $screens = $meta['args'];
     
    448432
    449433    echo '<div class="editor_individual_wrap"><h2>' . __('Congratulations text', 'wha-crossword') . '</h2>';
    450     $message = !empty(get_post_meta($post->ID, 'whacw_congratulations_individual', true)) ? get_post_meta($post->ID, 'whacw_congratulations_individual', true) : 'Congratulations individual!';
     434    $message = !empty(get_post_meta($post->ID, 'whacw_congratulations_individual', true)) ?
     435        get_post_meta($post->ID, 'whacw_congratulations_individual', true) : 'Congratulations individual!';
    451436    /* Individual congratulations text */
    452437    wp_editor($message, 'whacw_congratulations_individual', $settings = array(
     
    462447// Save data
    463448add_action('save_post', 'whacw_save_postdata');
    464 function whacw_save_postdata($post_id)
    465 {
    466 
     449function whacw_save_postdata($post_id) {
    467450
    468451    if (!wp_verify_nonce($_POST['myplugin_noncename'], plugin_basename(__FILE__)))
     
    522505
    523506// Settings page
    524 function whacw_register_settings()
    525 {
     507function whacw_register_settings() {
    526508
    527509    add_option('whacw_option_bg_color', 'crossword backgroundg color');
     
    554536
    555537// Create submenu in admin panel
    556 function whacw_register_options_page()
    557 {
     538function whacw_register_options_page() {
    558539
    559540    add_submenu_page('edit.php?post_type=wha_crossword',
     
    745726add_action('add_meta_boxes', 'whacs_sidebar_meta_box', 2);
    746727
    747 
    748 function whacs_sidebar_meta_box_callback($post, $meta) // Call Areachart option fields and save
    749 {
     728// Call Areachart option fields and save
     729function whacs_sidebar_meta_box_callback($post, $meta) {
    750730    $item = '';
    751731    $item .= '<h1>Plugin Developed by</h1>';
     
    771751    echo $item;
    772752}
     753
Note: See TracChangeset for help on using the changeset viewer.