diff --git a/includes/hangar-plugin-settings-pannel.php b/includes/hangar-plugin-settings-pannel.php new file mode 100644 index 0000000..a2bfde2 --- /dev/null +++ b/includes/hangar-plugin-settings-pannel.php @@ -0,0 +1,278 @@ + 'hangar_wpplugin_field_olderthandate', + // 'class' => 'hangar-wpplugin-row', + // 'hangar_wpplugin_custom_data' => 'custom', + // ] + // ); + } +} + + +/** +* register our hangar_wpplugin_settings_init to the admin_init action hook +*/ +add_action( 'admin_init', 'hangar_wpplugin_settings_init' ); + +/** +* custom option and settings: +* callback functions +*/ + + +// home control panel cb + +// to see wich pages and post are shown in home page +if( ! function_exists('hangar_wpplugin_section_control_home_cb') ){ + function hangar_wpplugin_section_control_home_cb(){ + + global $wpdb; + $querystr = " + SELECT wposts.post_name,wposts.ID, users.user_login, m1.meta_value as inicio, m2.meta_value as orden + FROM $wpdb->posts wposts + INNER JOIN $wpdb->postmeta m1 ON wposts.ID = m1.post_id + INNER JOIN $wpdb->postmeta m2 ON wposts.ID = m2.post_id + INNER JOIN $wpdb->users users ON wposts.post_author = users.ID + WHERE (wposts.post_type = 'post' OR wposts.post_type = 'page') + AND m1.meta_key = 'Inici' + AND m1.meta_value = '1' + AND m2.meta_key = 'Ordre_inici' + GROUP BY ID + ORDER BY inicio DESC, CAST(orden AS SIGNED) ASC + "; + + echo'
Nombre Post | +Id | +Autor Post | +Inicio | +Orden | +
---|---|---|---|---|
$nom | +$id | +$autor | +$inici | +$ordre | +
+ +
+ . +// the "class" key value is used for the "class" attribute of the+ number of days from today to the past or the date from wich will be considered old posts. Then the class oldpost will be added to the post and pages so you can apply a css style to your theme.', 'hangar-wpplugin-textdomain' ); ?> +
+ + + + + + + + ++ +
+ +